import useFindPosts from '@/composable/find-posts';
import usePostModifier from '@composable/post-modifier';
import { message } from 'ant-design-vue';
import 'ant-design-vue/es/message/style/css';

export default function usePostApi() {
  return {
    // 查找Post相关
    ...useFindPosts(),
    // 修改Post相关
    ...usePostModifier(
      (_) => location.reload(),
      (error) => {
        if(error)
          message.error(`出现错误：${error}`)
        else 
          message.error("出现错误")
      }
    )
  }
}